package com.yaolong.api.modules.opms.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.yaolong.commons.base2.BaseDomain;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 常住居民表
 * </p>
 *
 * @author yaolonga
 * @since 2023-02-05
 * @version v1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("opms_fix_resident")
@ApiModel(value="FixResident对象", description="居民管理")
public class FixResident extends BaseDomain {

    private static final long serialVersionUID = 1L;



    @ApiModelProperty(value = "居民id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "户口类型（农村，城镇）")
    @Excel(name = "户口类型",width = 20)
    @TableField("hk_type")

    private String hkType;

    @ApiModelProperty(value = "组号")
    @TableField("group_number")
    @Excel(name = "组号",width = 20)
    private String groupNumber;

    @ApiModelProperty(value = "户口本号")
    @Excel(name = "户口本号",width = 20)
    @TableField("hkb_number")
    private String hkbNumber;

    @ApiModelProperty(value = "姓名")
    @Excel(name = "姓名",width = 20)
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "曾用名")
    @Excel(name = "曾用名",width = 20)
    @TableField("former_name")
    private String formerName;

    @ApiModelProperty(value = "户主")
    @Excel(name = "户主",width = 20)
    @TableField("householder")
    private String householder;

    @ApiModelProperty(value = "户主关系")
    @Excel(name = "户主关系",width = 20)
    @TableField("householder_relation")
    private String householderRelation;

    @ApiModelProperty(value = "身份证")
    @Excel(name = "身份证",width = 20)
    @TableField("id_card")
    private String idCard;

    @ApiModelProperty(value = "签发机关")
    @Excel(name = "签发机关",width = 20)
    @TableField("issuing_authority")
    private String issuingAuthority;

    @ApiModelProperty(value = "签发日期")
  /*  @Excel(name = "签发日期",width = 20,format = "yyyy-MM-dd")*/
   /* @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)*/
    @JsonFormat(pattern = "yyyy-MM-dd")
    @TableField("issuing_date")
    private LocalDate issuingDate;

    @ApiModelProperty(value = "出生日期")
    @Excel(name = "出生日期",width = 20,format = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
   /* @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)*/
    @TableField("birth_date")
    private LocalDate birthDate;

    @ApiModelProperty(value = "出生地")
    @Excel(name = "出生地",width = 200)
    @TableField("birth_place")
    private String birthPlace;

    @ApiModelProperty(value = "性别")
    @Excel(name = "性别",width = 20)
    @TableField("sex")
    private String sex;

    @ApiModelProperty(value = "身高（cm）")
    @Excel(name = "身高（cm）",width = 20)
    @TableField("height")
    private Integer height;

    @ApiModelProperty(value = "血型（A/B/AB/O/熊猫）")
    @Excel(name = "血型",width = 20)
    @TableField("blood_type")
    private String bloodType;

    @ApiModelProperty(value = "健康状况")
    @TableField("health")
    private String health;

    @ApiModelProperty(value = "户籍所在地")
    @TableField("hj_addr")
    private String hjAddr;

    @ApiModelProperty(value = "民族（汉/黎等）")
    @Excel(name = "户口类型",width = 20)
    @TableField("nation")
    private String nation;

    @ApiModelProperty(value = "籍贯")
    @Excel(name = "籍贯",width = 20)
    @TableField("native_place")
    private String nativePlace;

    @ApiModelProperty(value = "现居地点")
    @Excel(name = "现居地点",width = 20)
    @TableField("now_addr")
    private String nowAddr;

    @ApiModelProperty(value = "其他地址")
    @TableField("other_addr")
    private String otherAddr;

    @ApiModelProperty(value = "联系电话")
    @Excel(name = "联系电话",width = 20)
    @TableField("contact_number")
    private String contactNumber;

    @ApiModelProperty(value = "文化程度")
    @Excel(name = "文化程度",width = 20)
    @TableField("culture_type")
    private String cultureType;

    @ApiModelProperty(value = "婚姻状况")
    @Excel(name = "户口类型",width = 20)
    @TableField("marital_status")
    private String maritalStatus;

    @ApiModelProperty(value = "兵役状况")
    @TableField("military_service_status")
    private String militaryServiceStatus;

    @ApiModelProperty(value = "宗教信仰")
    @TableField("religion")
    private String religion;

    @ApiModelProperty(value = "职业（xx）")
    @Excel(name = "职业",width = 20)
    @TableField("profession")
    private String profession;

    @ApiModelProperty(value = "政治面貌")
    @Excel(name = "政治面貌",width = 20)
    @TableField("politics_status")
    private String politicsStatus;

    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "户籍状态")
    @Excel(name = "户籍状态",width = 20)
    @TableField("hj_status")
    private String hjStatus;

    @ApiModelProperty(value = "登记日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField("regist_date")
    private LocalDateTime registDate;

    @ApiModelProperty(value = "家庭id")
    @TableField("family_id")
    private Long familyId;

    @ApiModelProperty(value = "是否困难群体")
    @TableField("is_difficult_group")
    private Boolean isDifficultGroup;

    @ApiModelProperty(value = "年龄")
    @Excel(name = "年龄",width = 20)
    @TableField("age")
    private Integer age;

    @ApiModelProperty(value = "就业状况（失业、在业）")
    @TableField("employment_status")
    private String employmentStatus;

    @ApiModelProperty(value = "是否残疾（0-false 1-true）")
    @TableField("is_disability")
    private Boolean isDisability;

    @ApiModelProperty(value = "残疾等级（A/B/C/暂无等）")
    @TableField("disability_level")
    private String disabilityLevel;

    @TableField(exist = false)
    @ApiModelProperty(value = "当前页")
    private int current;
    @TableField(exist = false)
    @ApiModelProperty(value = "分页大小")
    private int size;
}
